<template>
  <div id="home">
    <Category v-bind:categoryData="categoryData"/>
      home
    <router-view/>
  </div>
</template>

<script>
import Category from '../basic/Category'
import Artitle from '../basic/Artitle'
import Footer from '../basic/Footer'
import Top from '../basic/Top'
import HomeFetch from '../../fetch/home'
const homeWebService = new HomeFetch()
export default {
  name: 'Home',
  data () {
    return {
      categoryData: [{id: 1, name: '名胜'}, {id: 2, name: '旅游'}]
    }
  },
  mounted () {
    homeWebService.getData(111).catch(error => {
      console.log(JSON.stringify(error))
    })
  },
  components: {
    Category,
    Artitle,
    Footer,
    Top
  }
}
</script>

<style>
</style>
